package org.pine.dictionary.bean.request;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.pine.dictionary.common.StatusEnum;

import java.io.Serial;
import java.io.Serializable;

/**
 * <p>
 * 字典明细保存或更新请求体
 * </p>
 *
 * @author pine
 * @since 2024-05-17
 */
@Schema(title = "字典明细保存或更新请求体")
@Data
public class DictionaryDetailSaveRequest implements Serializable {

    @Serial
    private static final long serialVersionUID = -7138861928998971077L;

    /**
     * 字典ID
     */
    @Schema(title = "dictionaryId", description = "字典ID，新增时传递")
    private String dictionaryId;

    /**
     * 字典明细ID
     */
    @Schema(title = "dictionaryDetailId", description = "字典明细ID，更新时传递")
    private String dictionaryDetailId;

    /**
     * 字典值
     */
    @Schema(title = "dictionaryValue", description = "字典值")
    private String dictionaryValue;

    /**
     * 字典值编码
     */
    @Schema(title = "dictionaryValueCode", description = "字典值编码")
    private String dictionaryValueCode;

    /**
     * 字典值名称
     */
    @Schema(title = "dictionaryValueName", description = "字典值名称")
    private String dictionaryValueName;

    /**
     * 备注
     */
    @Schema(title = "remark", description = "备注")
    private String remark;

    /**
     * 排序
     */
    @Schema(title = "ordered", description = "排序")
    private Integer ordered;

    /**
     * 状态: 1=启用，0=禁用
     *
     * @see StatusEnum
     */
    @JsonSerialize(using = StatusEnum.JsonSerializer.class)
    @JsonDeserialize(using = StatusEnum.JsonDeserializer.class)
    @Schema(title = "status", description = "状态: 1=启用，0=禁用")
    private StatusEnum status;
}
